home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
pluginy Firefox
/
1951
/
1951.xpi
/
chrome
/
fission.jar
/
content
/
fission
/
fission.xml
< prev
next >
Wrap
Extensible Markup Language
|
2009-05-08
|
3KB
|
94 lines
<?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl" xmlns:xbl="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
<!-- binding for Firefox 3.0 and later -->
<binding id="fission-urlbar-redux" extends="chrome://browser/content/urlbarBindings.xml#urlbar">
<content sizetopopup="pref" fission="">
<xul:hbox class="autocomplete-textbox-container" flex="1">
<children includes="image|deck|stack|box">
<xul:image class="autocomplete-icon" allowevents="true"/>
</children>
<xul:stack class="fission-progress-stack" flex="1">
<children includes="progressmeter"/>
<xul:hbox class="autocomplete-textbox-container-fission">
<xul:hbox anonid="textbox-input-box" class="textbox-input-box" flex="1" xbl:inherits="tooltiptext=inputtooltiptext">
<children/>
<html:input anonid="input" class="autocomplete-textbox textbox-input" flex="1" allowevents="true" xbl:inherits="tooltiptext=inputtooltiptext,onfocus,onblur,value,type,maxlength,disabled,size,readonly,userAction"/>
</xul:hbox>
<children includes="hbox"/>
</xul:hbox>
</xul:stack>
</xul:hbox>
<xul:dropmarker anonid="historydropmarker" class="autocomplete-history-dropmarker" allowevents="true" xbl:inherits="open,enablehistory"/>
<xul:popupset anonid="popupset" class="autocomplete-result-popupset"/>
</content>
</binding>
<binding id="smooth-progressbar" extends="chrome://global/content/bindings/progressmeter.xml#progressmeter">
<implementation>
<field name="_animation">null</field>
<field name="_precValue">parseFloat(this.value)</field>
<field name="_officialValue">Math.round(this.value)</field>
<property name="precValue" onget="return this._precValue;" onset="this.setAttribute('value', Math.round((this._precValue = val))); return val;"/>
<method name="endAnimation">
<parameter name="aValue"/>
<body><![CDATA[
if (this._animation)
{
clearInterval(this._animation);
this._animation = null;
}
this.precValue = aValue;
if (this._officialValue != aValue)
{
this._officialValue = aValue;
// fire DOM event so that accessible value change events occur
var event = document.createEvent("Events");
event.initEvent("ValueChange", true, true);
this.dispatchEvent(event);
}
]]></body>
</method>
<property name="value" onget="return this.getAttribute('value') || '0';">
<setter><![CDATA[
var maxVal = Math.round(this.max || 100); // this.max isn't defined under Gecko 1.9.0
var newVal = Math.min(Math.max(Math.round(val), 0), maxVal);
var curVal = this.value;
if (newVal <= curVal || curVal == 0 && newVal == maxVal)
{
this.endAnimation(newVal);
}
else
{
if (this._animation)
{
clearInterval(this._animation);
}
var step = Math.max(Math.round((newVal - curVal) / 10), 1);
this._animation = setInterval(function(aThis) {
if (aThis.precValue + step < newVal)
{
aThis.precValue += step;
}
else
{
aThis.endAnimation(newVal);
}
}, 15, this);
}
return val;
]]></setter>
</property>
</implementation>
</binding>
</bindings>